It works! Somehow. I had thought waste would be a problem, but apparently not if there are only three atoms to deal with.

Not optimized for cycles at all.